if(typeof Cc == "undefined") { var Cc = Components.classes; }
if(typeof Ci == "undefined") { var Ci = Components.interfaces; }
if(typeof Cu == "undefined") { var Cu = Components.utils; }

	var paneTab = {
		init: function() {
			this.initGlass();
			this.updateClosebuttonMenulist();
		},
		
		updateClosebuttonMenulist: function() {
			if(this._e("closebutton-menulist").selectedIndex != 1) {
				this._e("clipWidth").disabled = true;
			} else if(this._e("closebutton-menulist").selectedIndex == 1) {
				this._e("clipWidth").disabled = false;
			}
		},
		
		_e: function(id) {
			return document.getElementById(id);
		},
		
		srv: Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService),
		
		initGlass: function() {
			if(this.osPlatform() != "WINNT") {
				document.getElementById("glass-menuitem").hidden = true;
				this.srv.setBoolPref("extensions.cfxh.glass", false);
			}
			if(window.navigator.oscpu=="Windows NT 5.1") {
				document.getElementById("glass-menuitem").hidden = true;
				this.srv.setBoolPref("extensions.cfxh.glass", false);
			}
		},
		
		osPlatform: function() {
			return Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS;
		}
	};